﻿
package extremefx.ui.dnd {
	import extremefx.events.EventArgs;		

	/**
	 * @author Marcelo Volmaro
	 */
	public class DropEvent extends EventArgs {

		private var _dragInitiator:IDragSource;
		private var _sourceData:SourceData;
		private var _xp:int;
		private var _yp:int;
		private var _target:IDropListener;
		private var _rTarget:IDropListener;

		public function DropEvent(
			pDragInitiator:IDragSource, 
			pSourceData:SourceData, 
			pMouseXpos:int, 
			pMouseYpos:int, 
			pTargetComponent:IDropListener = null,
			pRelatedTargetComponent:IDropListener = null) {
			
			_dragInitiator = pDragInitiator;
			_sourceData = pSourceData;
			_xp = pMouseXpos;
			_yp = pMouseYpos;
			_target = pTargetComponent;
			_rTarget = pRelatedTargetComponent;
		}

		public function get dragInitiator():IDragSource {
			return _dragInitiator;
		}
		
		public function get sourceData():SourceData {
			return _sourceData;
		}
		
		public function get target():IDropListener {
			return _target;
		}
		
		public function get x():int {
			return _xp;
		}
		
		public function get y():int {
			return _yp;
		}
		
		public function get relatedTarget():IDropListener {
			return _rTarget;
		}
	}
}
